package com.vdisk4j;

import java.util.HashMap;
import java.util.Map;

/**
 * 简单的Map包装类,为了链式操作
 * 
 * <p/>如果发现任何bug或有任何意见建议,请发送邮件到 vdisk4j@wendal.net
 * <p/>项目主页: http://vdisk4j.googlecode.com
 * <p/>
 * <p/>我的博客: http://wendal.net
 * @author wendal(vdisk4j@wendal.net)
 */
public class MapWrapper {

	private Map<String, Object> map;

	public MapWrapper put(String key, Object value) {
		map.put(key, value);
		return this;
	}

	public Map<String, Object> map() {
		return map;
	}

	public static MapWrapper make() {
		MapWrapper mw = new MapWrapper();
		mw.map = new HashMap<String, Object>();
		return mw;
	}

	public static MapWrapper make(Map<String, Object> map) {
		MapWrapper mw = new MapWrapper();
		mw.map = map;
		return mw;
	}
}
